<template>
  <div class="dashboard-container">
    <el-card>
      <el-table :data="$store.state.rights.rightsList" border stripe>
        <el-table-column label="#" type="index" />
        <el-table-column label="权限名称" prop="authName" />
        <el-table-column label="路径" prop="path" />
        <el-table-column label="权限等级" prop="level">
          <template slot-scope="scope">
            <el-tag v-if="scope.row.level === '0'">等级一</el-tag>
            <el-tag v-else-if="scope.row.level === '1'" type="success">等级二</el-tag>
            <el-tag v-else type="warning">等级三</el-tag>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {}
  },

  created() {
    this.$store.dispatch('rights/getRightsList')
  },

  methods: {}
}
</script>

<style scoped lang='less'>
</style>
